Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump serve-static from 1.15.0 to 1.16.2 #5887

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 17, 2024

Bumps serve-static from 1.15.0 to 1.16.2.

Release notes

Sourced from serve-static's releases.

1.16.0

What's Changed

New Contributors

Full Changelog: expressjs/serve-static@v1.15.0...1.16.0

Changelog

Sourced from serve-static's changelog.

1.16.2 / 2024-09-11

  • deps: encodeurl@~2.0.0

1.16.1 / 2024-09-11

1.16.0 / 2024-09-10

  • Remove link renderization in html while redirecting
Commits
Maintainer changes

This version was pushed to npm by wesleytodd, a new releaser for serve-static since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [serve-static](https://github.com/expressjs/serve-static) from 1.15.0 to 1.16.2.
- [Release notes](https://github.com/expressjs/serve-static/releases)
- [Changelog](https://github.com/expressjs/serve-static/blob/v1.16.2/HISTORY.md)
- [Commits](expressjs/serve-static@v1.15.0...v1.16.2)

---
updated-dependencies:
- dependency-name: serve-static
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Sep 17, 2024
Comment on lines -11978 to +11983
"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This diff hunk looks to be a no-op: it's just splitting apart two copies of the same entry.

In other words, dependabot's version of Yarn seems to fail to notice that these are the same and can be coalesced.

(Same goes for the handful of other hunks later in the file.)

@gnprice
Copy link
Member

gnprice commented Sep 18, 2024

This issue probably doesn't affect us. It's in a Web server framework, which we use only within some dev dependencies:

$ yarn why serve-static
yarn why v1.22.19
[1/4] Why do we have the module "serve-static"...?
[…]
=> Found "[email protected]"
info Reasons this module exists
   - "react-native#@react-native-community#cli" depends on it
   - Hoisted from "react-native#@react-native-community#cli#serve-static"
   - Hoisted from "react-native#@react-native-community#cli#@react-native-community#cli-debugger-ui#serve-static"
   - Hoisted from "react-native#@react-native-community#cli#@react-native-community#cli-server-api#serve-static"
[…]

Apparently the vulnerability shows up if an attacker makes a request to the server, and the server code calls response.redirect.

I'm not certain it can't affect us, though: possibly @react-native-community/cli-debugger-ui via serve-static does expose such a redirect, so that if someone's running that when developing our codebase possibly it could be accessible to an attacker on another machine, or something.

So we'll take the upgrade.

The diff is a little messy as I commented above. The mess is harmless but would probably cause similar mess in reverse the next time we do a yarn upgrade or yarn add etc. operation ourselves; possibly even just yarn / yarn install (which is routine in development). So I'll take a few extra minutes and do the upgrade myself.

gnprice added a commit to gnprice/zulip-mobile that referenced this pull request Sep 18, 2024
Taking this upgrade because we learned from dependabot that it fixes
a security issue:
  zulip#5887

The issue is in a dev-only indirect dependency, and even our
development tools *probably* don't trigger it.  But I can't
rule out that they might.

The yarn.lock diff from dependabot is a bit messy, though,
so here's me doing the same upgrade directly.

---

Because this is an indirect dependency, `yarn upgrade serve-static`
just does nothing.  (Seems like a bug / misfeature in Yarn.)

And I don't want to do a general `yarn upgrade` in this legacy
codebase right now -- that would balloon into a larger task.

So, here's a fun technique to make the upgrade in a surgical way:

  $ perl -i -0pe 's{^serve-static@.*?\n\K.*?^$}
                   {  version "1.16.2"\n}sm
                 ' yarn.lock
  $ yarn

That deletes the "version", "resolved", and other fields in the
lockfile's resolution of the `serve-static` package, replacing them
with just a "version" line pointing at the desired version.

Then rerunning `yarn` (aka `yarn install`) starts from that version
when filling back in the rest of the details.
@gnprice
Copy link
Member

gnprice commented Sep 18, 2024

So I'll take a few extra minutes and do the upgrade myself.

#5889. Closing this PR in favor of that one.

@gnprice gnprice closed this Sep 18, 2024
Copy link
Contributor Author

dependabot bot commented on behalf of github Sep 18, 2024

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot bot deleted the dependabot/npm_and_yarn/serve-static-1.16.2 branch September 18, 2024 03:54
@gnprice
Copy link
Member

gnprice commented Sep 18, 2024

(Apart from the upgrade itself which is of possible but doubtful relevance, this PR came in handy because it turned up #5888! That's something we'll definitely want to fix.)

@gnprice
Copy link
Member

gnprice commented Sep 18, 2024

I'm not certain it can't affect us, though: possibly […]

Also to be explicit about why I gave this more attention than #5874: that one was a DoS, but this one (CVE-2024-43800) is RCE if it can be triggered, which is a much worse consequence.

gnprice added a commit to gnprice/zulip-mobile that referenced this pull request Sep 19, 2024
Taking this upgrade because we learned from dependabot that it fixes
a security issue:
  zulip#5887

The issue is in a dev-only indirect dependency, and even our
development tools *probably* don't trigger it.  But I can't
rule out that they might.

The yarn.lock diff from dependabot is a bit messy, though,
so here's me doing the same upgrade directly.

---

Because this is an indirect dependency, `yarn upgrade serve-static`
just does nothing.  (Seems like a bug / misfeature in Yarn.)

And I don't want to do a general `yarn upgrade` in this legacy
codebase right now -- that would balloon into a larger task.

So, here's a fun technique to make the upgrade in a surgical way:

  $ perl -i -0pe 's{^serve-static@.*?\n\K.*?^$}
                   {  version "1.16.2"\n}sm
                 ' yarn.lock
  $ yarn

That deletes the "version", "resolved", and other fields in the
lockfile's resolution of the `serve-static` package, replacing them
with just a "version" line pointing at the desired version.

Then rerunning `yarn` (aka `yarn install`) starts from that version
when filling back in the rest of the details.
chrisbobbe pushed a commit that referenced this pull request Sep 19, 2024
Taking this upgrade because we learned from dependabot that it fixes
a security issue:
  #5887

The issue is in a dev-only indirect dependency, and even our
development tools *probably* don't trigger it.  But I can't
rule out that they might.

The yarn.lock diff from dependabot is a bit messy, though,
so here's me doing the same upgrade directly.

---

Because this is an indirect dependency, `yarn upgrade serve-static`
just does nothing.  (Seems like a bug / misfeature in Yarn.)

And I don't want to do a general `yarn upgrade` in this legacy
codebase right now -- that would balloon into a larger task.

So, here's a fun technique to make the upgrade in a surgical way:

  $ perl -i -0pe 's{^serve-static@.*?\n\K.*?^$}
                   {  version "1.16.2"\n}sm
                 ' yarn.lock
  $ yarn

That deletes the "version", "resolved", and other fields in the
lockfile's resolution of the `serve-static` package, replacing them
with just a "version" line pointing at the desired version.

Then rerunning `yarn` (aka `yarn install`) starts from that version
when filling back in the rest of the details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant